#ifndef _EB0_GAME_STATE_H_
#define _EB0_GAME_STATE_H_

#include <EB0/Prereq.h>
#include <EB0/Window/WindowListener.h>
#include <EB0/Window/FrameListener.h>

// Only one of instance of each state should exist at a time
// Loading and unloading of states may corrupt data.

// If you wish to use a state among multiple windows you can do a check against the incoming window
// It just might involve keeping a list of active windows :) But we never said it would be simple!

namespace EB0
{
namespace States
{
	class GameState abstract : public Window::WindowListener, public Window::FrameListener
	{
		friend class Managers::StateManager;

	public:
		GameState();
		~GameState(); // should be private, accessible only by StateManager?

	protected:
		virtual void load(Window::RenderWindow* window = 0);
		virtual void createScene(Window::RenderWindow* window = 0);
		virtual void destroyScene(Window::RenderWindow* window = 0);
		virtual void unload(Window::RenderWindow* window = 0);

		virtual void pause(Window::RenderWindow* window = 0); // the state loses its position atop the stack
		virtual void resume(Window::RenderWindow* window = 0); // the state regains its position atop the stack
		virtual void update(Window::RenderWindow* window = 0, float dt = 0.0f); // Repeated Task
	};
} // namespace States
}

#endif // _EB0_GAME_STATE_H_